package cn.xopencode.userservice.enums;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * 血型
 */
public enum BloodTypeEnum implements IntArrayValuable {

    BLOOD_TYPE0(0, "未知"),
    BLOOD_TYPE1(1, "A"),
    BLOOD_TYPE2(2, "B"),
    BLOOD_TYPE3(3, "O"),
    BLOOD_TYPE4(4, "AB");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BloodTypeEnum::getBloodType).toArray();

    /**
     * 性别标识
     */
    private final Integer bloodType;
    /**
     * 描述
     */
    private final String name;

    BloodTypeEnum(Integer bloodType, String name) {
        this.bloodType = bloodType;
        this.name = name;
    }

    public Integer getBloodType() {
        return bloodType;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
